package cn.iocoder.yudao.module.call.dal.mysql.ivrkeywordscustom;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.call.dal.dataobject.ivrkeywordscustom.IvrKeywordsCustomDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.call.controller.admin.ivrkeywordscustom.vo.*;

/**
 * ivr流程关键字 Mapper
 *
 * @author 数创万维
 */
@Mapper
public interface IvrKeywordsCustomMapper extends BaseMapperX<IvrKeywordsCustomDO> {

    default PageResult<IvrKeywordsCustomDO> selectPage(IvrKeywordsCustomPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<IvrKeywordsCustomDO>()
                .eqIfPresent(IvrKeywordsCustomDO::getFlowId, reqVO.getFlowId())
                .eqIfPresent(IvrKeywordsCustomDO::getBranch, reqVO.getBranch())
                .eqIfPresent(IvrKeywordsCustomDO::getKeys, reqVO.getKeys())
                .eqIfPresent(IvrKeywordsCustomDO::getKeysPinyin, reqVO.getKeysPinyin())
                .eqIfPresent(IvrKeywordsCustomDO::getType, reqVO.getType())
                .eqIfPresent(IvrKeywordsCustomDO::getBranchType, reqVO.getBranchType())
                .betweenIfPresent(IvrKeywordsCustomDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(IvrKeywordsCustomDO::getId));
    }

}